﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BusinessObjects.BO_GetObjects;
using LibraryO2S;

public partial class Controls_ucHomeNews : System.Web.UI.UserControl
{
    string news_id;

    public string News_id
    {
        get { return news_id; }
        set { news_id = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadData();
        }
    }

    protected void loadData()
    {
        DataTable objDT = BO_Articles.Search(Convert.ToInt32(news_id));
        if (objDT.Rows.Count > 0)
        {
            news_title.InnerText = objDT.Rows[0]["FULL_ARTICLE_TITLE"].ToString();
            news_desc.InnerText = objDT.Rows[0]["FULL_ARTICLE_DESCRIPTION"].ToString();
            news_detail.InnerHtml = objDT.Rows[0]["ARTICLE_DETAIL"].ToString();
        }
    }

    protected void loadRelative()
    {

    }
}